package com.ruoyi.attendance.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 考勤记录对象 attendance
 *
 * @author ruoyi
 * @date 2025-11-01
 */
public class Attendance extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 用户ID（关联sys_user表） */
    @Excel(name = "用户ID", readConverterExp = "关=联sys_user表")
    private Long userId;

    /** 用户名 */
    @Excel(name = "用户名")
    private String username;

    /** 上班打卡时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "上班打卡时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date checkInTime;

    /** 下班打卡时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "下班打卡时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date checkOutTime;

    /** 状态（正常/迟到/早退） */
    @Excel(name = "状态", readConverterExp = "正=常/迟到/早退")
    private String status;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }

    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }

    public void setUsername(String username)
    {
        this.username = username;
    }

    public String getUsername()
    {
        return username;
    }

    public void setCheckInTime(Date checkInTime)
    {
        this.checkInTime = checkInTime;
    }

    public Date getCheckInTime()
    {
        return checkInTime;
    }

    public void setCheckOutTime(Date checkOutTime)
    {
        this.checkOutTime = checkOutTime;
    }

    public Date getCheckOutTime()
    {
        return checkOutTime;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("userId", getUserId())
                .append("username", getUsername())
                .append("checkInTime", getCheckInTime())
                .append("checkOutTime", getCheckOutTime())
                .append("status", getStatus())
                .append("createTime", getCreateTime())
                .toString();
    }
}
